/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.udistrital.framework.adminMenu.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author nrodriguez
 */
@Entity
@Table(name = "ament")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Ament.findAll", query = "SELECT a FROM Ament a"),
    @NamedQuery(name = "Ament.findByAencod", query = "SELECT a FROM Ament a WHERE a.aencod = :aencod"),
    @NamedQuery(name = "Ament.findByAendes", query = "SELECT a FROM Ament a WHERE a.aendes = :aendes")})
public class Ament implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "aencod")
    private Integer aencod;
    @Column(name = "aendes")
    private String aendes;

    public Ament() {
    }

    public Ament(Integer aencod) {
        this.aencod = aencod;
    }

    public Integer getAencod() {
        return aencod;
    }

    public void setAencod(Integer aencod) {
        this.aencod = aencod;
    }

    public String getAendes() {
        return aendes;
    }

    public void setAendes(String aendes) {
        this.aendes = aendes;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (aencod != null ? aencod.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Ament)) {
            return false;
        }
        Ament other = (Ament) object;
        if ((this.aencod == null && other.aencod != null) || (this.aencod != null && !this.aencod.equals(other.aencod))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.udistrital.ud.modelo.Ament[ aencod=" + aencod + " ]";
    }
    
}
